class House():
    def __init__(self,address,area):
        #地理位置
        self.address = address
        #房屋面积
        self.area = area
        # 剩余面积
        self.freee_area = area
        # 家居列表 开始时家里没有家具
        self.furnitures = []

    # 添加家居
    def addFurniture(self,furniture):
        """添加家居"""
        if self.freee_area > furniture.area:
            self.furnitures.append(furniture)
            self.freee_area -= furniture.area
        else:
            print("家具太大了，房间放不下啦！")

    def __str__(self):
        furs = []
        if len(self.furnitures) > 0 :
            for item in self.furnitures:
                #print(item.name)
                furs.append(item.name)
        return f"房子位置：【{self.address}】," \
               f"占地面积：【{self.area}】," \
               f"剩余面积：【{self.freee_area}】" \
               f"家居有：【{furs}】"
